home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / objects_59_prep script.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  11.1 KB  |  322 lines

  1. on exitFrame
  2.   global OnceCheck, RecipeNum, Choice, CurrVideo, AfterFavorite
  3.   if the visible of sprite 31 = 1 then
  4.     set the cursor of sprite 32 to 1
  5.   else
  6.     if the visible of sprite 31 = 0 then
  7.       set the cursor of sprite 32 to 0
  8.     end if
  9.   end if
  10.   if OnceCheck = 0 then
  11.     cursor(-1)
  12.     set OnceCheck to 1
  13.     repeat with i = 4 to 6
  14.       set the cursor of sprite i to [34, 35]
  15.       set the cursor of sprite (i + 10) to [34, 35]
  16.     end repeat
  17.     set the cursor of sprite 3 to [34, 35]
  18.     set the cursor of sprite 17 to [34, 35]
  19.     set the cursor of sprite 35 to [34, 35]
  20.     if the visible of sprite 16 then
  21.       set the visible of sprite 16 to 0
  22.     end if
  23.     repeat with i = 19 to 29
  24.       if the visible of sprite i then
  25.         set the visible of sprite i to 0
  26.       end if
  27.     end repeat
  28.     repeat with i = 31 to 35
  29.       if the visible of sprite i then
  30.         set the visible of sprite i to 0
  31.       end if
  32.     end repeat
  33.     if the visible of sprite i then
  34.       set the visible of sprite 38 to 0
  35.     end if
  36.     if the visible of sprite i then
  37.       set the visible of sprite 37 to 0
  38.     end if
  39.     set CurrVideo to line RecipeNum of field "videoLib"
  40.     repeat with i = 3 to 8
  41.       puppetSprite(i, 1)
  42.     end repeat
  43.     set x to the number of lines in the text of member ("recipe" & RecipeNum)
  44.     set tarHow to line x - 3 of the text of member ("recipe" & RecipeNum)
  45.     if the name of member value(RecipeNum) of castLib "small picts" = "noPict" then
  46.       set the member of sprite 7 to member "mezze"
  47.     else
  48.       set the member of sprite 7 to member RecipeNum of castLib "small picts"
  49.     end if
  50.     puppetSprite(36, 1)
  51.     puppetSprite(17, 1)
  52.     set howVec to ["Long", "Short", "Shot", "Hot"]
  53.     set howShown to getPos(howVec, tarHow)
  54.     set the visible of sprite (25 + howShown) to 1
  55.     cursor(0)
  56.     set the visible of sprite 16 to 0
  57.     forget(window "notes")
  58.     windowRoutine()
  59.     if (CurrVideo <> " ") and (CurrVideo <> EMPTY) then
  60.       DoMovie(CurrVideo)
  61.     else
  62.       set the member of sprite 36 to member RecipeNum of castLib "slideNW"
  63.       set the visible of sprite 36 to 1
  64.       set the visible of sprite 17 to 0
  65.     end if
  66.     if (AfterFavorite = 0) and (CurrVideo <> " ") and (CurrVideo <> EMPTY) then
  67.       set the movieRate of sprite 41 to 1
  68.     else
  69.       set AfterFavorite to 0
  70.     end if
  71.   end if
  72.   if the timer > 60 then
  73.     set the frameRate of member 200 of castLib "Videos" to -1
  74.   end if
  75.   go(the frame)
  76. end
  77.  
  78. on mouseDown
  79.   global checkPress, CurrVideo
  80.   set checkPress to the clickOn
  81.   set bDown to the clickOn
  82.   if (bDown > 2) and (bDown < 7) then
  83.     if (CurrVideo = " ") or (CurrVideo = EMPTY) then
  84.       set the visible of sprite 36 to 0
  85.       set the visible of sprite 17 to 1
  86.     end if
  87.     set the member of sprite bDown to member ("PrepBtn" & bDown - 2)
  88.   else
  89.     if bDown = 24 then
  90.       set the member of sprite 24 to member "shopDelete" of castLib "objects"
  91.     else
  92.       if bDown = 25 then
  93.         set the member of sprite 25 to member "shopClear" of castLib "objects"
  94.       else
  95.         if bDown > 41 then
  96.           buttonPressedDown(bDown, "objects")
  97.         end if
  98.       end if
  99.     end if
  100.   end if
  101.   updateStage()
  102.   repeat while the mouseDown
  103.   end repeat
  104.   set the member of sprite bDown to member "origin"
  105. end
  106.  
  107. on mouseUp
  108.   global checkPress, CurrVideo, Navigate, Choice, gRecNumber, goOn, gAdd, gProgrmPathOnHD, MyFavorites, AfterFavorite, current, RecipeNum
  109.   set the member of sprite 36 to member "big_pict"
  110.   set the editable of member "CurrNotes" to 1
  111.   set checkPress2 to the clickOn
  112.   if checkPress = checkPress2 then
  113.     set bUp to the clickOn
  114.     if (bUp > 2) and (bUp < 7) then
  115.       set the member of sprite bUp to member "Origin"
  116.       if bUp = 3 then
  117.         set listToGoTo to EMPTY
  118.         set x to the number of lines in field "backField"
  119.         set currFrame to the frame - 1
  120.         if currFrame = 190 then
  121.           set Navigate to "abc"
  122.           set dest to "abc"
  123.           set the text of field "total" to the text of field "abc"
  124.         else
  125.           if currFrame = 180 then
  126.             set Navigate to "abc"
  127.             set dest to "abc"
  128.             set the text of field "total" to the text of field "abc"
  129.           else
  130.             if currFrame = 195 then
  131.               set Navigate to "partyDrinks"
  132.               set dest to "entertainment"
  133.             else
  134.               if currFrame = 175 then
  135.                 set Navigate to "abc"
  136.                 set dest to "abc"
  137.                 set the text of field "total" to the text of field "abc"
  138.               else
  139.                 if currFrame = 130 then
  140.                   set Navigate to "non-alco"
  141.                   set dest to "non-alco"
  142.                 else
  143.                   if currFrame = 125 then
  144.                     set Navigate to "abc"
  145.                     set dest to "abc"
  146.                     set the text of field "total" to the text of field "abc"
  147.                   else
  148.                     set Navigate to "alco"
  149.                     set alcoDest to line x - 1 of field "backField"
  150.                     set alcoDest to value(alcoDest)
  151.                   end if
  152.                 end if
  153.               end if
  154.             end if
  155.           end if
  156.         end if
  157.         if dest <> EMPTY then
  158.           put marker(0) into line x + 1 of field "backField"
  159.           clearPuppets()
  160.           if Navigate = "alco" then
  161.             go(alcoDest)
  162.           else
  163.             go(marker(dest))
  164.           end if
  165.         end if
  166.       else
  167.         if bUp = 4 then
  168.           DontMovie()
  169.           repeat with i = 19 to 25
  170.             set the visible of sprite i to 1
  171.             case i of
  172.               20, 21, 23, 24, 25:
  173.                 set the cursor of sprite i to [34, 35]
  174.             end case
  175.             set the cursor of sprite 13 to [34, 35]
  176.           end repeat
  177.           set the cursor of sprite 35 to [34, 35]
  178.           repeat with i = 34 to 35
  179.             set the visible of sprite i to 1
  180.           end repeat
  181.           repeat with i = 31 to 32
  182.             set the visible of sprite i to 0
  183.           end repeat
  184.           puppetSprite(24, 1)
  185.           puppetSprite(25, 1)
  186.           if (CurrVideo <> " ") and (CurrVideo <> EMPTY) then
  187.             set the visible of sprite 16 to 1
  188.           end if
  189.         else
  190.           if bUp = 5 then
  191.             DontMovie()
  192.             repeat with i = 19 to 25
  193.               set the visible of sprite i to 0
  194.               case i of
  195.                 20, 21, 23, 24, 25:
  196.                   set the cursor of sprite i to -1
  197.               end case
  198.             end repeat
  199.             set the cursor of sprite 13 to -1
  200.             repeat with i = 34 to 35
  201.               set the visible of sprite i to 0
  202.             end repeat
  203.             repeat with i = 31 to 33
  204.               set the visible of sprite i to 1
  205.             end repeat
  206.             puppetSprite(24, 0)
  207.             puppetSprite(25, 0)
  208.             set goOn to 1
  209.             set gRecNumber to RecipeNum
  210.             if (CurrVideo <> " ") and (CurrVideo <> EMPTY) then
  211.               set the visible of sprite 16 to 1
  212.             end if
  213.           else
  214.             if bUp = 6 then
  215.               DontMovie()
  216.               set gAdd to 1
  217.               if the stageRight > 640 then
  218.                 set winRect to rect(318, 172, 716, 494)
  219.               else
  220.                 set winRect to rect(238, 111, 634, 431)
  221.               end if
  222.               set the modal of window "favorite" to 1
  223.               set the titleVisible of window "favorite" to 0
  224.               set the windowType of window "favorite" to 3
  225.               set the rect of window "favorite" to winRect
  226.               set the fileName of window "favorite" to gProgrmPathOnHD & "favorite.dir"
  227.               if the visible of sprite 16 then
  228.                 set the visible of sprite 16 to 0
  229.               end if
  230.               repeat with i = 19 to 29
  231.                 if the visible of sprite i then
  232.                   set the visible of sprite i to 0
  233.                 end if
  234.               end repeat
  235.               repeat with i = 31 to 35
  236.                 if the visible of sprite i then
  237.                   set the visible of sprite i to 0
  238.                 end if
  239.               end repeat
  240.               if the visible of sprite i then
  241.                 set the visible of sprite 38 to 0
  242.               end if
  243.               if the visible of sprite i then
  244.                 set the visible of sprite 37 to 0
  245.               end if
  246.               set AfterFavorite to 1
  247.               set MyFavorites to 0
  248.               set current to []
  249.               add(current, RecipeNum)
  250.               open(window "favorite")
  251.             end if
  252.           end if
  253.         end if
  254.       end if
  255.     else
  256.       if bUp = 17 then
  257.         if the type of member 200 of castLib "videos" <> #digitalVideo then
  258.           set the member of sprite 36 to member RecipeNum of castLib "slideNW"
  259.           set the visible of sprite 36 to 1
  260.           set the editable of member "CurrNotes" to 0
  261.         end if
  262.       else
  263.         if bUp = 24 then
  264.           set the member of sprite 24 to member "origin"
  265.           repeat with i = 1 to the number of lines in field "shop2"
  266.             if the foreColor of line i of field "shop2" = 35 then
  267.               delete line i of field "shop2"
  268.               delete line i of field "shop1"
  269.             end if
  270.           end repeat
  271.           set the foreColor of field "shop1temp" to 204
  272.           set the foreColor of field "shop2temp" to 204
  273.           set the text of field "shop1temp" to line 1 to 10 of field "shop1"
  274.           set the text of field "shop2temp" to line 1 to 10 of field "shop2"
  275.         else
  276.           if bUp = 25 then
  277.             set the member of sprite 25 to member "origin"
  278.             set the foreColor of field "shop1" to 204
  279.             set the foreColor of field "shop2" to 204
  280.             set the foreColor of field "shop1temp" to 204
  281.             set the foreColor of field "shop2temp" to 204
  282.             set the text of field "shop1" to EMPTY
  283.             set the text of field "shop2" to EMPTY
  284.             set the text of field "shop1temp" to EMPTY
  285.             set the text of field "shop2temp" to EMPTY
  286.           else
  287.             if bUp > 41 then
  288.               if bUp = 44 then
  289.                 set x to the number of lines in field "backField"
  290.                 set the text of field "backField" to line 1 to x - 1 of field "BackField"
  291.               else
  292.                 if bUp = 48 then
  293.                   if the visible of sprite 16 then
  294.                     set the visible of sprite 16 to 0
  295.                   end if
  296.                   repeat with i = 19 to 29
  297.                     if the visible of sprite i then
  298.                       set the visible of sprite i to 0
  299.                     end if
  300.                   end repeat
  301.                   repeat with i = 31 to 35
  302.                     if the visible of sprite i then
  303.                       set the visible of sprite i to 0
  304.                     end if
  305.                   end repeat
  306.                   if the visible of sprite i then
  307.                     set the visible of sprite 38 to 0
  308.                   end if
  309.                   if the visible of sprite i then
  310.                     set the visible of sprite 37 to 0
  311.                   end if
  312.                 end if
  313.               end if
  314.               buttonPressedUp(bUp, "objects")
  315.             end if
  316.           end if
  317.         end if
  318.       end if
  319.     end if
  320.   end if
  321. end
  322.